-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add exdoc:loaded event #2069
Add exdoc:loaded event #2069
Conversation
📦 Docs artifacts are ready: https://github.com/elixir-lang/ex_doc/actions/runs/12963745544/artifacts/2484808161 |
Just one commend and looks good to me. @liamcmitchell please let us know if you have any concerns, thanks! It may be worth documenting |
Co-authored-by: Jonatan Kłosko <[email protected]>
@garazdawi you will have to update Erlang. I plan to release v0.37.0-rc.0 this weekend, which should also be compatible with Erlang/OTP 28. |
@@ -89,7 +89,7 @@ export function initialize () { | |||
}) | |||
|
|||
window.addEventListener('hashchange', markCurrentHashInSidebar) | |||
window.addEventListener('swup:page:view', markCurrentHashInSidebar) | |||
window.addEventListener('exdoc:loaded', markCurrentHashInSidebar) | |||
|
|||
markCurrentHashInSidebar() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now duplicated and could be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I will push it soon. And to be clear, the next line does:
// Triggers layout, defer.
requestAnimationFrame(scrollNodeListToCurrentCategory)
That would still be fine, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I can confirm this one breaks it and nothing is being marked on the sidebar. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will ship a new version with this still using swup:page:view
. If you have suggestions on how to unify it, it would be very welcome. :) Thank you ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I missed that this init is lazy and will always come after the first exdoc:loaded
. Pushed changes to unify and make more clear in #2070
💚 💙 💜 💛 ❤️ |
Closes #2068.